/*
 * base_task_scheduler.cpp
 *
 *  Created on: 2014. 4. 3.
 *      Author: wooyoung
 */

#include "base_task_scheduler.h"

BaseTaskScheduler::BaseTaskScheduler()
{
	order_queue_ = new std::priority_queue<BaseTaskFormat*, std::vector<BaseTaskFormat*>, TaskOperator>();
}

BaseTaskScheduler::~BaseTaskScheduler()
{
	if (order_queue_ != NULL) {

		while (!order_queue_->empty())
			order_queue_->pop();

		delete order_queue_;
		order_queue_ = NULL;
	}
}

void BaseTaskScheduler::EnqueueTask(BaseTaskFormat* task) {
	order_queue_->push(task);
}
